<template>
    <el-dialog :model-value="props.visible" title="查看半成品订单" width="30%" @close="handleClose">
        <div class="timeline-container">
            <el-timeline >
                <el-timeline-item v-for="(item,index) in props.infoList" :key="index" :timestamp="item.orderDate">
                    {{ `${item.personName || 'xxx'} 下单 ${item.number} ${item.productName}` }}
                </el-timeline-item>
            </el-timeline>
        </div>
        <template #footer>
            <div class="dialog-footer">
                <el-button  @click="handleClose" >关闭</el-button>
            </div>
        </template>
    </el-dialog>
</template>

<script setup lang="ts">

const props = defineProps<{
    visible: boolean,
    infoList: any[]
}>();
const emits = defineEmits(['close']);

const handleClose = () => {
    emits('close');
};
</script>

<style lang="scss" scoped>

</style>